When the dialog comes up without a selected item, make 'Select'
insensitive. Also, don't allow to unselect an item without
selecting a different one.
GtkWidget *vbox;
GtkWidget *vbox2;
GtkWidget *button, *w;
+ GAppInfo *info;
gtk_container_set_border_width (GTK_CONTAINER (self), 5);
_("_Select"),
GTK_RESPONSE_OK);
+ info = gtk_app_chooser_get_app_info (GTK_APP_CHOOSER (self->priv->app_chooser_widget));
+ gtk_widget_set_sensitive (self->priv->button, info != NULL);
+ if (info)
+ g_object_unref (info);
+
gtk_dialog_set_default_response (GTK_DIALOG (self),
GTK_RESPONSE_OK);
}
gtk_widget_show (self->priv->program_list);
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (self->priv->program_list));
- gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
+ gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
gtk_tree_selection_set_select_function (selection, gtk_app_chooser_selection_func,
self, NULL);
g_signal_connect_swapped (selection, "changed",